package com.xiaoyi.encrypt;

import com.xiaoyi.annotataion.Encrypt;
import com.xiaoyi.config.EncryptionConfig;
import com.xiaoyi.util.Base64Util;

/**
 * Base64 不算是加密，算是一种编码
 *
 * @author xiaoyi
 * @version 1.0.0
 * @date 2023/08/01 15:17:00
 */
public class Base64Encryptor implements IEncryptorStrategy {

    @Override
    public String encrypt(String value, EncryptionConfig config, Encrypt encrypt) {
        return Base64Util.encrypt(value);
    }

    @Override
    public String decrypt(String value, EncryptionConfig config, Encrypt encrypt) {
        return Base64Util.decrypt(value);
    }
}
